home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / XmVaCreateSimpleOptionMenu.z / XmVaCreateSimpleOptionMenu
Encoding:
Text File  |  2003-11-18  |  9.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmVVVVVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _X_m_V_a_C_r_e_a_t_e_S_i_m_p_l_e_O_p_t_i_o_n_M_e_n_u - A RowColumn widget convenience
  10.       creation function
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <Xm/RowColumn.h>
  14.  
  15.       Widget XmVaCreateSimpleOptionMenu (ppppaaaarrrreeeennnntttt,,,, nnnnaaaammmmeeee,,,, ooooppppttttiiiioooonnnn____llllaaaabbbbeeeellll,,,,
  16.             ooooppppttttiiiioooonnnn____mmmmnnnneeeemmmmoooonnnniiiicccc,,,, bbbbuuuuttttttttoooonnnn____sssseeeetttt,,,, ccccaaaallllllllbbbbaaaacccckkkk,,,, aaaarrrrgggg............)
  17.            _W_i_d_g_e_t     ppppaaaarrrreeeennnntttt;
  18.            _S_t_r_i_n_g     nnnnaaaammmmeeee;
  19.            _X_m_S_t_r_i_n_g     ooooppppttttiiiioooonnnn____llllaaaabbbbeeeellll;
  20.            _K_e_y_S_y_m     ooooppppttttiiiioooonnnn____mmmmnnnneeeemmmmoooonnnniiiicccc;
  21.            _i_n_t     bbbbuuuuttttttttoooonnnn____sssseeeetttt;
  22.            _X_t_C_a_l_l_b_a_c_k_P_r_o_cccccaaaallllllllbbbbaaaacccckkkk;
  23.  
  24.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  25.       _X_m_V_a_C_r_e_a_t_e_S_i_m_p_l_e_O_p_t_i_o_n_M_e_n_u creates an    instance of a
  26.       RowColumn widget of type _X_m_M_E_N_U__O_P_T_I_O_N and returns the
  27.       associated widget ID.     This routine uses the ANSI C
  28.       variable-length argument list    (varargs) calling convention.
  29.  
  30.       This routine creates an OptionMenu and its Pulldown submenu
  31.       containing PushButtonGadget or CascadeButtonGadget children.
  32.       The name of each button is button_nnnn, where nnnn is an integer
  33.       from 0 to one    minus the number of buttons in the menu.  The
  34.       name of each separator is separator_nnnn, where nnnn is an integer
  35.       from 0 to one    minus the number of separators in the menu.
  36.       Buttons and separators are named and created in the order in
  37.       which    they are specified in the variable portion of the
  38.       argument list.
  39.  
  40.       ppppaaaarrrreeeennnntttt
  41.            Specifies the parent widget ID
  42.  
  43.       nnnnaaaammmmeeee Specifies the name of the created widget
  44.  
  45.       ooooppppttttiiiioooonnnn____llllaaaabbbbeeeellll
  46.            Specifies the label string to be    used on    the left side
  47.            of the OptionMenu.
  48.  
  49.       ooooppppttttiiiioooonnnn____mmmmnnnneeeemmmmoooonnnniiiicccc
  50.            Specifies a keysym for a    key that, when pressed by the
  51.            user, posts the associated Pulldown MenuPane.
  52.  
  53.       bbbbuuuuttttttttoooonnnn____sssseeeetttt
  54.            Specifies which PushButtonGadget    is initially set.  The
  55.            value is    the integer nnnn that corresponds to the nnnnth
  56.            PushButtonGadget    specified in the variable portion of
  57.            the argument list.  Only    a PushButtonGadget can be set,
  58.            and only    PushButtonGadgets are counted in determining
  59.            the integer nnnn.  The first PushButtonGadget is number 0.
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmVVVVVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       ccccaaaallllllllbbbbaaaacccckkkk
  75.            Specifies a callback procedure to be called when    a
  76.            button is activated.  This callback function is added
  77.            to each button after creation as    the button's
  78.            _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k.  The callback function is called
  79.            when a button is    activated, and the button number is
  80.            returned    in the cccclllliiiieeeennnntttt____ddddaaaattttaaaa field.
  81.  
  82.       The variable portion of the argument list consists of    groups
  83.       of arguments.     The first argument in each group is a
  84.       constant or a    string and determines which arguments follow
  85.       in that group.  The last argument in the list    must be    NULL.
  86.       Following are    the possible first arguments in    each group of
  87.       varargs:
  88.  
  89.       _X_m_V_a_P_U_S_H_B_U_T_T_O_N
  90.            This is followed    by four    additional arguments.  The set
  91.            specifies one button in the OptionMenu's    Pulldown
  92.            submenu and some    of its resource    values.     The button
  93.            created is a PushButtonGadget.  Following are the
  94.            additional four arguments, in this order:
  95.  
  96.       llllaaaabbbbeeeellll
  97.            The label string, of type XmString.
  98.  
  99.       mmmmnnnneeeemmmmoooonnnniiiicccc
  100.            The mnemonic, of    type KeySym.
  101.  
  102.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr
  103.            The accelerator,    of type    String.
  104.  
  105.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr____tttteeeexxxxtttt
  106.            The accelerator text, of    type XmString.    This is
  107.            followed    by no additional arguments.  It    specifies one
  108.            separator in the    OptionMenu's Pulldown submenu.    This
  109.            is followed by no additional arguments.    It specifies
  110.            one separator in    the OptionMenu's Pulldown submenu.
  111.            The separator type is _X_m_D_O_U_B_L_E__L_I_N_E.  This is followed
  112.            by one additional argument, the value of    the resource,
  113.            of type XtArgVal.  The pair specifies a resource    and
  114.            its value for the Pulldown submenu.  This is followed
  115.            by four additional arguments.  The set specifies    a
  116.            resource    and its    value for the Pulldown submenu.     A
  117.            resource    type conversion    is performed if    necessary.
  118.            Following are the additional four arguments, in this
  119.            order:
  120.  
  121.       nnnnaaaammmmeeee The resource name, of type String.
  122.  
  123.       ttttyyyyppppeeee The type    of the resource    value supplied,    of type
  124.            String.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((UUUU3333NNNNXXXXIIII))))XXXX SSSSyyyysssstttteeeeXXXXmmmmmmmmVVVVVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeeOOOOppppttttiiiioooonnnnMMMMeeeennnnuuuu((((3333XXXX))))
  137.  
  138.  
  139.  
  140.       vvvvaaaalllluuuueeee
  141.            The resource value (or a    pointer    to the resource    value,
  142.            depending on the    type and size of the value), of    type
  143.            XtArgVal.
  144.  
  145.       ssssiiiizzzzeeee The size    of the resource    value in bytes,    of type    int.
  146.            This is followed    by one additional argument of type
  147.            XtVarArgsList.  This argument is    a nested list of
  148.            varargs returned    by _X_t_V_a_C_r_e_a_t_e_A_r_g_s_L_i_s_t.
  149.  
  150.       The user can specify resources in a resource file for    the
  151.       automatically    created    widgets    and gadgets of an OptionMenu.
  152.       The following    list identifies    the names of these widgets (or
  153.       gadgets) and the associated OptionMenu areas.
  154.  
  155.       +o
  156.  
  157.       +o    Option Menu Label Gadget    - "OptionLabel"
  158.  
  159.       +o    Option Menu Cascade Button - "OptionButton"
  160.  
  161.       For more information on variable-length argument lists, see
  162.       the X    Toolkit    Intrinsics documentation.
  163.  
  164.       A number of resources    exist specifically for use with    this
  165.       and other simple menu    creation routines.  For    a complete
  166.       definition of    RowColumn and its associated resources,    see
  167.       _X_m_R_o_w_C_o_l_u_m_n(_3_X).
  168.  
  169.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  170.       Returns the RowColumn    widget ID.
  171.  
  172.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  173.       _X_m_C_r_e_a_t_e_O_p_t_i_o_n_M_e_n_u(_3_X), _X_m_C_r_e_a_t_e_R_o_w_C_o_l_u_m_n(_3_X),
  174.       _X_m_C_r_e_a_t_e_S_i_m_p_l_e_O_p_t_i_o_n_M_e_n_u(_3_X),    and _X_m_R_o_w_C_o_l_u_m_n(_3_X).
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 11/11/03)
  196.  
  197.  
  198.  
  199.